package com.fanqiechaodan.prototype;

import com.alibaba.fastjson.JSON;

/**
 * @author fanqiechaodan
 * @Classname Demo
 * @Description
 */
public class Demo {

    public static void main(String[] args) throws CloneNotSupportedException {
        Person person1 = new Person("张三", 18, new Address("北京", "青年路"));
        Person person2 = (Person) person1.clone();
        System.out.println(JSON.toJSONString(person1));
        System.out.println(JSON.toJSONString(person2));
    }
}
